package cn.cttic.app.api.enums;

import cn.cttic.common.core.exception.base.BaseException;
import lombok.Getter;

/**
 * ENUM: 性别
 */
@Getter
public enum UserAccountType {

    SALE("销售人员", 1),
    INSTALL("安装人员 ", 2),
    ;

    private final String label;
    private final Integer value;

    UserAccountType(String label, Integer value) {
        this.label = label;
        this.value = value;
    }

    public static UserAccountType of(Integer value) {
        for (UserAccountType type : UserAccountType.values()) {
            if (type.value.equals(
                value
            )) {
                return type;
            }
        }
        throw new BaseException("订单状态类型未匹配");
    }
}

